home *** CD-ROM | disk | FTP | other *** search
-
- SHMEM_LOCK(3) SHMEM_LOCK(3)
-
-
- NNNNAAAAMMMMEEEE
- sssshhhhmmmmeeeemmmm____cccclllleeeeaaaarrrr____lllloooocccckkkk, sssshhhhmmmmeeeemmmm____sssseeeetttt____lllloooocccckkkk, sssshhhhmmmmeeeemmmm____tttteeeesssstttt____lllloooocccckkkk - Releases, locks,
- and tests a mutual exclusion memory lock
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- C or C++:
-
- ####iiiinnnncccclllluuuuddddeeee <<<<mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh>>>>
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____cccclllleeeeaaaarrrr____lllloooocccckkkk((((lllloooonnnngggg ****_l_o_c_k))));;;;
-
- vvvvooooiiiidddd sssshhhhmmmmeeeemmmm____sssseeeetttt____lllloooocccckkkk((((lllloooonnnngggg ****_l_o_c_k))));;;;
-
- iiiinnnntttt sssshhhhmmmmeeeemmmm____tttteeeesssstttt____lllloooocccckkkk((((lllloooonnnngggg ****_l_o_c_k))));;;;
-
- Fortran:
-
- IIIINNNNTTTTEEEEGGGGEEEERRRR _l_o_c_k, SSSSHHHHMMMMEEEEMMMM____TTTTEEEESSSSTTTT____LLLLOOOOCCCCKKKK
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____CCCCLLLLEEEEAAAARRRR____LLLLOOOOCCCCKKKK((((_l_o_c_k))))
-
- CCCCAAAALLLLLLLL SSSSHHHHMMMMEEEEMMMM____SSSSEEEETTTT____LLLLOOOOCCCCKKKK((((_l_o_c_k))))
-
- IIII ==== SSSSHHHHMMMMEEEEMMMM____TTTTEEEESSSSTTTT____LLLLOOOOCCCCKKKK((((_l_o_c_k))))
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The sssshhhhmmmmeeeemmmm____sssseeeetttt____lllloooocccckkkk routine sets a mutual exclusion lock after waiting
- for the lock to be freed by any other PE currently holding the lock.
- Waiting PEs are assured of getting the lock in a first-come,
- first-served manner.
-
- The sssshhhhmmmmeeeemmmm____cccclllleeeeaaaarrrr____lllloooocccckkkk routine releases a lock previously set by
- sssshhhhmmmmeeeemmmm____sssseeeetttt____lllloooocccckkkk after ensuring that all local and remote stores
- initiated in the critical region are complete.
-
- The sssshhhhmmmmeeeemmmm____tttteeeesssstttt____lllloooocccckkkk function sets a mutual exclusion lock only if it
- is currently cleared. By using this function, a PE can avoid blocking
- on a set lock. If the lock is currently set, the function returns
- without waiting.
-
- These routines are appropriate for protecting a critical region from
- simultaneous update by multiple PEs. They accept the following
- argument:
-
- _l_o_c_k A symmetric data object that is a scalar variable or an
- array of length 1. This data object must be set to 0 on all
- processing elements (PEs) prior to the first use. _l_o_c_k must
- be of type integer. If you are using Fortran, it must be of
- default kind.
-
- NNNNOOOOTTTTEEEESSSS
- The term _s_y_m_m_e_t_r_i_c _d_a_t_a _o_b_j_e_c_t is defined on iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3).
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
- The sssshhhhmmmmeeeemmmm____tttteeeesssstttt____lllloooocccckkkk function returns 0 if the lock was originally
- cleared and this call was able to set the lock. A value of 1 is
- returned if the lock had been set and the call returned without
- waiting to set the lock.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm(3)
-